//
// Created by Bruce on 11/20/24.
//

#ifndef CAMMULTITHREADDETECTOR_SIGLETON_HPP
#define CAMMULTITHREADDETECTOR_SIGLETON_HPP

#pragma once

#include <mutex>

namespace CamMultiThreadDetector{

	namespace Application{

		template<typename T>
		class Singleton
		{
		public:
			static T& getInstance()
			{
				static T instance;
				return instance;
			}

			Singleton(T&&)            = delete;
			Singleton(const T&)       = delete;
			void operator= (const T&) = delete;

		protected:
			Singleton()               = default;
			virtual ~Singleton()      = default;
		};

	} // namespace Application

} // namespace CamMultiThreadDetector


#endif // CAMMULTITHREADDETECTOR_SIGLETON_HPP
